﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Roton.ZZT
{
    /// <summary>
    /// Interface for Thing Properties.
    /// </summary>
    interface IThing
    {
        /// <summary>
        /// The number of game cycles that pass between executions of this Thing's behavior.
        /// </summary>
        int Cycle { get; set; }

        /// <summary>
        /// Thing index of the follower. Used mostly for centipedes.
        /// </summary>
        int Follower { get; set; }

        /// <summary>
        /// The offset of the current OOP instruction, in bytes.
        /// </summary>
        int Instruction { get; set; }

        /// <summary>
        /// Thing index of the leader. Used mostly for centipedes.
        /// </summary>
        int Leader { get; set; }

        /// <summary>
        /// Length of the OOP code. If negative, references the Thing index from which to copy code.
        /// </summary>
        int Length { get; set; }

        /// <summary>
        /// Retrieve a Location containing [X,Y].
        /// </summary>
        ILocation Location { get; }

        /// <summary>
        /// Parameter 1. This value has a variety of uses and will depend on the tile ID.
        /// </summary>
        int P1 { get; set; }

        /// <summary>
        /// Parameter 2. This value has a variety of uses and will depend on the tile ID.
        /// </summary>
        int P2 { get; set; }

        /// <summary>
        /// Parameter 3. This value has a variety of uses and will depend on the tile ID.
        /// </summary>
        int P3 { get; set; }

        /// <summary>
        /// Index in the heap where this Thing's code is located.
        /// </summary>
        int Pointer { get; set; }

        /// <summary>
        /// X vector. This value has a variety of uses and will depend on the tile ID.
        /// </summary>
        int StepX { get; set; }

        /// <summary>
        /// Y vector. This value has a variety of uses and will depend on the tile ID.
        /// </summary>
        int StepY { get; set; }

        /// <summary>
        /// Color of the tile under this Thing.
        /// </summary>
        int UnderColor { get; set; }

        /// <summary>
        /// ID of the tile under this Thing.
        /// </summary>
        int UnderID { get; set; }

        /// <summary>
        /// Retrieve a Vector containing [XStep,YStep].
        /// </summary>
        IVector Vector { get; }

        /// <summary>
        /// X location of this Thing.
        /// </summary>
        int X { get; set; }

        /// <summary>
        /// Y location of this Thing.
        /// </summary>
        int Y { get; set; }
    }
}
